package com.rentong.wx.cust.dao;

import com.rentong.wx.cust.domain.CustServiceOrderChefEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;
import java.util.Map;

/**
 * 
 * @author zhangle
 * @email 459343178@qq.com
 * @date 2024-12-24 14:42:32
 */
@Mapper
public interface CustServiceOrderChefDao extends BaseMapper<CustServiceOrderChefEntity> {

    void save(CustServiceOrderChefEntity custServiceOrderChefEntity);

    CustServiceOrderChefEntity findById(@Param("serviceOrderChefId") Long serviceOrderChefId);

    void updateByCustId(@Param("custId") Long custId, @Param("serviceOrderId") Long serviceOrderId, @Param("type") Integer type);

    CustServiceOrderChefEntity getByServiceOrderId(@Param("serviceOrderId") Long serviceOrderId, @Param("custId") Long custId);

    List<CustServiceOrderChefEntity> getCustServiceOrderChefByOrderId(@Param("serviceOrderId") Long serviceOrderId);

    CustServiceOrderChefEntity getCustServiceOrderChefByOrderIdAndCustId(@Param("serviceOrderId") Long serviceOrderId, @Param("custId") Long custId);


    void updateStat(CustServiceOrderChefEntity chefEntity);

    void updateStatByOrderId(@Param("serviceOrderId") Long serviceOrderId);

    List<CustServiceOrderChefEntity> getTimeoutChef();

    void updateServiceOrderChefState(Map<String, Object> params);

    CustServiceOrderChefEntity getByStat(@Param("serviceOrderId") Long serviceOrderId);

    void orderChefState(@Param("serviceOrderId") Long serviceOrderId, @Param("chefId") Long chefId);

    void cancelYuYue(@Param("serviceOrderId")Long serviceOrderId, @Param("currentCustId")Long currentCustId);
}
